import request from '@/utils/request'

export function indexget() {
    return request({
        url: 'api/Index/index',
        method: 'GET'
    })
}

export function login(data) {
    return request({
        url: 'api/Site/login',
        method: 'POST',
        data: {
            account: data.account,
            password: data.password
        }
    })
}

export function clause(id) {
    return request({
        url: 'api/index/sig',
        method: 'GET',
        params: {
            id: id
        }
    })
}
/**
 * wordtest
 * @param {}} id
 * @returns
 */
export function wordTest(id) {
    return request({
        url: 'api/WordExam/index',
        method: 'GET',
        params: {
            id: id
        }
    })
}
/**
 * 单词
 * @param {}} data
 * @returns
 */
export function word(data) {
    return request({
        url: 'api/unit/index',
        method: 'GET',
        params: {
            grade_id: data.grade_id,
            mold_id: data.mold_id,
            course_id: data.course_id,
        }
    })
}
/**
 * wordRead单词
 * @param {} data
 * @returns
 */
export function wordRead(data) {
    return request({
        url: 'api/Wordread/index',
        method: 'GET',
        params: {
            grade_id: data.grade_id,
            unit_id: data.unit_id
        }
    })
}

/**
 * 错误
 * @returns
 */
export function wrongTi() {
    return request({
        url: 'api/Error/index',
        method: 'GET'
    })
}
/**
 * Spell页面
 * @param {*} id
 * @returns
 */
export function spellWord(id) {
    return request({
        url: 'api/SentExam/index',
        method: 'GET',
        params: {
            unit_id: id
        }
    })
}
/**
 * spell 页面
 * @param {*} data
 * @returns
 */
export function spell(data) {
    return request({
        url: 'api/WordSpell/index',
        method: 'GET',
        params: {
            unit_id: data
        }
    })
}
export function spell2(data) {
    return request({
        url: 'api/index/sign',
        method: 'GET',
        params: {
            id: data.id
        }
    })
}

/**
 * spellworda
 */
 export function spellworda(data) {
    return request({
        url: '/api/GroupExam/index',
        method: 'GET',
        params: {
            unit_id: data.id
        }
    })
}
/**
 * spellword
 */
 export function spell3(data) {
    return request({
        url: '/api/WordSpell/index',
        method: 'GET',
        params: {
            unit_id: data.id
        }
    })
}
/**
 * spellphrase
 */
 export function spell4() {
    return request({
        url: '/api/GroupSpell/index',
        method: 'GET',
    })
}
/**
 * spellclause
 */
 export function spell5() {
    return request({
        url: '/api/SendSpell/index',
        method: 'GET',
    })
}
/**
 * spellb
 */
 export function spell6(data) {
    return request({
        url: '/api/SentExam/index',
        method: 'GET',
        params: {
            unit_id: data.id
        }
    })

}
export function spell7(data) {
    return request({
        url: '/api/index/sign',
        method: 'GET',
        params: {
            unit_id: data
        }
    })

}
export function spell8(data) {
    return request({
        url: '/api/unit/index',
        method: 'GET',
        params: {
            grade_id: data,
            mold_id: data,
            course_id: data,
        }
    })

}

//   web/
//   admin


// 在线测评 zx Evaluation
export function zxtest() {
    return request({
        url: 'api/Beta/index',
        method: 'GET'
    })
}
// clausetest
export function clausetest(id) {
    return request({
        url: 'api/GroupExam/index',
        method: 'GET',
        params: { id: id }
    })
}
//Phrasetest
export function Phrasetest(id) {
    return request({
        url: 'api/SentExam/index',
        method: 'GET',
        params: { id: id }
    })
}
